package 匿名函数

fun main() {
    val getDisCountWords = configDisCountWords()
    println(getDisCountWords("沐浴露"))

}

fun configDisCountWords(): (String) -> String {
    return { goodName: String ->
        val currentYear = 2027
        val hour = (1..24).shuffled().last()
        "${currentYear}年,双11${goodName}促销倒计时：$hour 小时"
    }
}